$dir = "/data1/bsi/BORA_processing/devel/eqtl/genotype_survival_bootstrap";
open BUFF,"/data1/bsi/BORA_processing/devel/eqtl/parallelize_genotypingsurvival/result_ref_file" or die "no input file\n";
open WRBUFF,">fileinputdirec";
#$header = <BUFF>;
$n =100;
$k =0;
$m =1;
$buff = "BUFF$m";
system("mkdir $m");
print WRBUFF "$dir/$m\n"; 
open($buff,">./$m/temp_input");
#print $buff $header;
while(<BUFF>)
{
	chomp($_);
	if($n == $k)
	{
		$m++;
		close($buff);
		$buff = "BUFF$m";
		
		system("mkdir $m");
		print WRBUFF "$dir/$m\n";
		open($buff,">./$m/temp_input");
	#	print $buff $header;
		$k = 0;
		
	}
	print $buff $_."\n";
	$k++;
}


